package com.zer0.tga.item;

import com.zer0.tga.Game;

public class Item {

		public boolean enabled;
		public int effect;
		public int cost;
		public String text;
		
		public Item(int effect, int cost, String text) {
	        this.enabled = false;
	        this.effect = effect;
	        this.cost = cost;
	        this.text = text;
	    }
		
		public boolean buy()
		{
			this.enabled = true;
			if( Game.getInstance().teemo.gold > cost)
			{
				Game.getInstance().teemo.gold -= cost;
				return true;
			}
			else
				return false;
		}
		

		public int get()
		{
			if(enabled)
				return effect;
			else
				return 0;
		}
}
